home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: JKLIER@news-feed.delphi.com (JKLIER@DELPHI.COM)
- Newsgroups: comp.std.c++
- Subject: Re: #ifdef XXXX
- Date: 3 Feb 1996 17:17:32 GMT
- Organization: Delphi Internet Services Corporation
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <4evnmo$msp@news2.delphi.com>
- References: <1996Feb1.092058.4745@iiasa.ac.at> <3112531A.3410@ElSegundoCA.ATTGIS.COM>
- NNTP-Posting-Host: taumet.eng.sun.com
- Content-Type: text
- Content-Length: 915
- Originator: clamage@taumet
-
- "Charles F. McDevitt" <Chuck.McDevitt@elsegundoca.attgis.com> writes:
-
- >Wouldn't it be better to update the C++ standard so the
- >default is that include files only get included once, and the
- >compiler/preprocessor keeps track of which ones it's already
- >seen. Then we wouldn't have to mess with these ugly #ifdefs
- >to make include files only be included once.
-
- Not necessarily a good idea. What about if another header file adds a define
- and running thru the header file a second time includes a different contents
- than the first time around.
- This is a very common practice in imake config files for example, which use
- the preprocessor from C to process all the include files. And it would have
- to be the preprocessor to take care of the tracking.
- I can't imagine what a nightmare that would be to get some of the old
- stuff to compile ;-) - not that I think that this is a very good coding
- practice.
-
- Jan
-
-
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
- summarized in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
- ]
-